/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.Timer;

/**
 *
 * @author Tjarco
 */
public class Memory_spel extends javax.swing.JFrame implements ActionListener {
    private boolean buttonBackPressed, statusBarActive = false;
    private Timer timerStatusBar;
    final private int POS_DOWN = -80;
    final private int POS_UP = -40;
    private int moveDown;
    private int moveUp;
    private String notificationText;
    private int pogingen;

    private long timeNow, timeNew;





// <editor-fold defaultstate="collapsed" desc=" getters and setters ">
    public boolean isMemoryCard1() {
        return MemoryCard1;
    }
        public boolean isButtonBackPressed() {
        return buttonBackPressed;
    }

    public void setButtonBackPressed(boolean buttonBackPressed) {
        this.buttonBackPressed = buttonBackPressed;
    }
    public void setMemoryCard1(boolean MemoryCard1) {
        this.MemoryCard1 = MemoryCard1;
    }
    
    public boolean isMemoryCard10() {
        return MemoryCard10;
    }
    
    public void setMemoryCard10(boolean MemoryCard10) {
        this.MemoryCard10 = MemoryCard10;
    }
    
    public boolean isMemoryCard11() {
        return MemoryCard11;
    }
    
    public void setMemoryCard11(boolean MemoryCard11) {
        this.MemoryCard11 = MemoryCard11;
    }
    
    public boolean isMemoryCard12() {
        return MemoryCard12;
    }
    
    public void setMemoryCard12(boolean MemoryCard12) {
        this.MemoryCard12 = MemoryCard12;
    }
    
    public boolean isMemoryCard2() {
        return MemoryCard2;
    }
    
    public void setMemoryCard2(boolean MemoryCard2) {
        this.MemoryCard2 = MemoryCard2;
    }
    
    public boolean isMemoryCard3() {
        return MemoryCard3;
    }
    
    public void setMemoryCard3(boolean MemoryCard3) {
        this.MemoryCard3 = MemoryCard3;
    }
    
    public boolean isMemoryCard4() {
        return MemoryCard4;
    }
    
    public void setMemoryCard4(boolean MemoryCard4) {
        this.MemoryCard4 = MemoryCard4;
    }
    
    public boolean isMemoryCard5() {
        return MemoryCard5;
    }
    
    public void setMemoryCard5(boolean MemoryCard5) {
        this.MemoryCard5 = MemoryCard5;
    }
    
    public boolean isMemoryCard6() {
        return MemoryCard6;
    }
    
    public void setMemoryCard6(boolean MemoryCard6) {
        this.MemoryCard6 = MemoryCard6;
    }
    
    public boolean isMemoryCard7() {
        return MemoryCard7;
    }
    
    public void setMemoryCard7(boolean MemoryCard7) {
        this.MemoryCard7 = MemoryCard7;
    }
    
    public boolean isMemoryCard8() {
        return MemoryCard8;
    }
    
    public void setMemoryCard8(boolean MemoryCard8) {
        this.MemoryCard8 = MemoryCard8;
    }
    
        public boolean isMemoryCard9() {
        return MemoryCard9;
    }

    public void setMemoryCard9(boolean MemoryCard9) {
        this.MemoryCard9 = MemoryCard9;
    }
   
    public int getPogingen() {
        return pogingen;
    }

    public void setPogingen(int pogingen) {
        this.pogingen = pogingen;
    }

// </editor-fold>
    boolean MemoryCard1;
    boolean MemoryCard2;
    boolean MemoryCard3;
    boolean MemoryCard4;
    boolean MemoryCard5;
    boolean MemoryCard6;
    boolean MemoryCard7;
    boolean MemoryCard8;

    public boolean isHoverEffect1() {
        return hoverEffect1;
    }

    public void setHoverEffect1(boolean hoverEffect1) {
        this.hoverEffect1 = hoverEffect1;
    }

    public boolean isHoverEffect10() {
        return hoverEffect10;
    }

    public void setHoverEffect10(boolean hoverEffect10) {
        this.hoverEffect10 = hoverEffect10;
    }

    public boolean isHoverEffect11() {
        return hoverEffect11;
    }

    public void setHoverEffect11(boolean hoverEffect11) {
        this.hoverEffect11 = hoverEffect11;
    }

    public boolean isHoverEffect12() {
        return hoverEffect12;
    }

    public void setHoverEffect12(boolean hoverEffect12) {
        this.hoverEffect12 = hoverEffect12;
    }

    public boolean isHoverEffect2() {
        return hoverEffect2;
    }

    public void setHoverEffect2(boolean hoverEffect2) {
        this.hoverEffect2 = hoverEffect2;
    }

    public boolean isHoverEffect3() {
        return hoverEffect3;
    }

    public void setHoverEffect3(boolean hoverEffect3) {
        this.hoverEffect3 = hoverEffect3;
    }

    public boolean isHoverEffect4() {
        return hoverEffect4;
    }

    public void setHoverEffect4(boolean hoverEffect4) {
        this.hoverEffect4 = hoverEffect4;
    }

    public boolean isHoverEffect5() {
        return hoverEffect5;
    }

    public void setHoverEffect5(boolean hoverEffect5) {
        this.hoverEffect5 = hoverEffect5;
    }

    public boolean isHoverEffect6() {
        return hoverEffect6;
    }

    public void setHoverEffect6(boolean hoverEffect6) {
        this.hoverEffect6 = hoverEffect6;
    }

    public boolean isHoverEffect7() {
        return hoverEffect7;
    }

    public void setHoverEffect7(boolean hoverEffect7) {
        this.hoverEffect7 = hoverEffect7;
    }

    public boolean isHoverEffect8() {
        return hoverEffect8;
    }

    public void setHoverEffect8(boolean hoverEffect8) {
        this.hoverEffect8 = hoverEffect8;
    }

    public boolean isHoverEffect9() {
        return hoverEffect9;
    }

    public void setHoverEffect9(boolean hoverEffect9) {
        this.hoverEffect9 = hoverEffect9;
    }
    private boolean hoverEffect1 = true;
    private boolean hoverEffect2= true;
    private boolean hoverEffect3= true;
    private boolean hoverEffect4= true;
    private boolean hoverEffect5= true;
    private boolean hoverEffect6= true;
    private boolean hoverEffect7= true;
    private boolean hoverEffect8= true;
    private boolean hoverEffect9= true;
    private boolean hoverEffect10= true;
    private boolean hoverEffect11= true;
    private boolean hoverEffect12= true;


    boolean MemoryCard9;
    boolean MemoryCard10;
    boolean MemoryCard11;
    boolean MemoryCard12;

    /**
     * Creates new form Memory_spel
     */
    public Memory_spel() {
        MemoryCard1 = false;
        MemoryCard2 = false;
        MemoryCard3 = false;
        MemoryCard4 = false;
        MemoryCard5 = false;
        MemoryCard6 = false;
        MemoryCard7 = false;
        MemoryCard8 = false;
        MemoryCard9 = false;
        MemoryCard10 = false;
        MemoryCard11 = false;
        MemoryCard12 = false;        
        initComponents();
        voledigScherm();
        
        showStatusBar("Goodluck!");
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        statusBar = new javax.swing.JLabel();
        statusLabel = new javax.swing.JLabel();
        jButton_back = new javax.swing.JButton();
        MemoryKaart1 = new javax.swing.JButton();
        MemoryKaart2 = new javax.swing.JButton();
        MemoryKaart3 = new javax.swing.JButton();
        MemoryKaart4 = new javax.swing.JButton();
        MemoryKaart5 = new javax.swing.JButton();
        MemoryKaart6 = new javax.swing.JButton();
        MemoryKaart7 = new javax.swing.JButton();
        MemoryKaart8 = new javax.swing.JButton();
        MemoryKaart9 = new javax.swing.JButton();
        MemoryKaart10 = new javax.swing.JButton();
        MemoryKaart11 = new javax.swing.JButton();
        MemoryKaart12 = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(1280, 720));
        setUndecorated(true);
        setResizable(false);
        getContentPane().setLayout(null);

        statusBar.setFont(new java.awt.Font("Lucida Grande", 0, 48)); // NOI18N
        statusBar.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        statusBar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/models/archievement_new.png"))); // NOI18N
        statusBar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        getContentPane().add(statusBar);
        statusBar.setBounds(260, -80, 890, 130);

        statusLabel.setFont(new java.awt.Font("Lucida Grande", 0, 18)); // NOI18N
        statusLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        getContentPane().add(statusLabel);
        statusLabel.setBounds(360, -20, 660, 60);

        jButton_back.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Back_Button.png"))); // NOI18N
        jButton_back.setBorderPainted(false);
        jButton_back.setContentAreaFilled(false);
        jButton_back.setFocusPainted(false);
        jButton_back.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jButton_backMouseExited(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jButton_backMouseEntered(evt);
            }
        });
        jButton_back.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_backActionPerformed(evt);
            }
        });
        getContentPane().add(jButton_back);
        jButton_back.setBounds(120, 10, 180, 130);

        MemoryKaart1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart1.setToolTipText("");
        MemoryKaart1.setBorderPainted(false);
        MemoryKaart1.setContentAreaFilled(false);
        MemoryKaart1.setFocusPainted(false);
        MemoryKaart1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart1MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart1MouseExited(evt);
            }
        });
        MemoryKaart1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart1ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart1);
        MemoryKaart1.setBounds(960, 160, 280, 160);

        MemoryKaart2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart2.setToolTipText("");
        MemoryKaart2.setBorderPainted(false);
        MemoryKaart2.setContentAreaFilled(false);
        MemoryKaart2.setFocusPainted(false);
        MemoryKaart2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart2MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart2MouseExited(evt);
            }
        });
        MemoryKaart2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart2ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart2);
        MemoryKaart2.setBounds(60, 520, 280, 160);

        MemoryKaart3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart3.setToolTipText("");
        MemoryKaart3.setBorderPainted(false);
        MemoryKaart3.setContentAreaFilled(false);
        MemoryKaart3.setFocusPainted(false);
        MemoryKaart3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                MemoryKaart3MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart3MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart3MouseExited(evt);
            }
        });
        MemoryKaart3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart3ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart3);
        MemoryKaart3.setBounds(60, 160, 280, 160);

        MemoryKaart4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart4.setToolTipText("");
        MemoryKaart4.setBorderPainted(false);
        MemoryKaart4.setContentAreaFilled(false);
        MemoryKaart4.setFocusPainted(false);
        MemoryKaart4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart4MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart4MouseExited(evt);
            }
        });
        MemoryKaart4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart4ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart4);
        MemoryKaart4.setBounds(360, 340, 280, 160);

        MemoryKaart5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart5.setToolTipText("");
        MemoryKaart5.setBorderPainted(false);
        MemoryKaart5.setContentAreaFilled(false);
        MemoryKaart5.setFocusPainted(false);
        MemoryKaart5.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart5MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart5MouseExited(evt);
            }
        });
        MemoryKaart5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart5ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart5);
        MemoryKaart5.setBounds(360, 520, 280, 160);

        MemoryKaart6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart6.setToolTipText("");
        MemoryKaart6.setBorderPainted(false);
        MemoryKaart6.setContentAreaFilled(false);
        MemoryKaart6.setFocusPainted(false);
        MemoryKaart6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart6MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart6MouseExited(evt);
            }
        });
        MemoryKaart6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart6ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart6);
        MemoryKaart6.setBounds(60, 340, 280, 160);

        MemoryKaart7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart7.setToolTipText("");
        MemoryKaart7.setBorderPainted(false);
        MemoryKaart7.setContentAreaFilled(false);
        MemoryKaart7.setFocusPainted(false);
        MemoryKaart7.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                MemoryKaart7MouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart7MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart7MouseExited(evt);
            }
        });
        MemoryKaart7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart7ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart7);
        MemoryKaart7.setBounds(360, 160, 280, 160);

        MemoryKaart8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart8.setToolTipText("");
        MemoryKaart8.setBorderPainted(false);
        MemoryKaart8.setContentAreaFilled(false);
        MemoryKaart8.setFocusPainted(false);
        MemoryKaart8.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart8MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart8MouseExited(evt);
            }
        });
        MemoryKaart8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart8ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart8);
        MemoryKaart8.setBounds(660, 340, 280, 160);

        MemoryKaart9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart9.setToolTipText("");
        MemoryKaart9.setBorderPainted(false);
        MemoryKaart9.setContentAreaFilled(false);
        MemoryKaart9.setFocusPainted(false);
        MemoryKaart9.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart9MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart9MouseExited(evt);
            }
        });
        MemoryKaart9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart9ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart9);
        MemoryKaart9.setBounds(660, 160, 280, 160);

        MemoryKaart10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart10.setToolTipText("");
        MemoryKaart10.setBorderPainted(false);
        MemoryKaart10.setContentAreaFilled(false);
        MemoryKaart10.setFocusPainted(false);
        MemoryKaart10.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart10MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart10MouseExited(evt);
            }
        });
        MemoryKaart10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart10ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart10);
        MemoryKaart10.setBounds(960, 340, 280, 160);

        MemoryKaart11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart11.setToolTipText("");
        MemoryKaart11.setBorderPainted(false);
        MemoryKaart11.setContentAreaFilled(false);
        MemoryKaart11.setFocusPainted(false);
        MemoryKaart11.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart11MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart11MouseExited(evt);
            }
        });
        MemoryKaart11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart11ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart11);
        MemoryKaart11.setBounds(960, 520, 280, 160);

        MemoryKaart12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png"))); // NOI18N
        MemoryKaart12.setToolTipText("");
        MemoryKaart12.setBorderPainted(false);
        MemoryKaart12.setContentAreaFilled(false);
        MemoryKaart12.setFocusPainted(false);
        MemoryKaart12.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MemoryKaart12MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MemoryKaart12MouseExited(evt);
            }
        });
        MemoryKaart12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MemoryKaart12ActionPerformed(evt);
            }
        });
        getContentPane().add(MemoryKaart12);
        MemoryKaart12.setBounds(660, 520, 280, 160);

        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/GUI/background.jpg"))); // NOI18N
        getContentPane().add(jLabel4);
        jLabel4.setBounds(0, 0, 1410, 720);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    //laat de statusbar naar beneden gaan > toon tekst > omhoog gaan
    public void showStatusBar(String text){
        
        if (!statusBarActive){
            statusBarActive = true;
            moveDown = POS_DOWN;
            moveUp = POS_UP;
        
            this.notificationText = text;
            timerStatusBar = new Timer(5, this);
            timerStatusBar.start();
        }
        else{
            this.notificationText = text;
            statusLabel.setText(this.notificationText);
        }
    }
    
    //method used by showStatusBar
    public void actionPerformed(ActionEvent a){
      
        if (moveDown != -40){
            moveDown++;
            statusBar.setLocation(statusBar.getX(), moveDown);
            
            if (moveDown == -50){
                statusLabel.setForeground(new Color(0,51,204));
                statusLabel.setFont(new Font("Lucida Grande", Font.PLAIN, 30));
                statusLabel.setText(this.notificationText);
                statusLabel.setLocation(statusLabel.getX(), 0);
            }
            timeNow = System.currentTimeMillis();
        }
        else if (moveDown == -40 & moveUp == -40){
            //wacht 2 seconden op het na beneden gaan
            timeNew = System.currentTimeMillis();
            if ((timeNow + 3000) < timeNew){
                moveUp--;
            }
        }
        else if (moveUp > POS_DOWN){
            statusBar.setLocation(statusBar.getX(), moveUp);
            moveUp--;
            
            if (moveUp == -50){
                statusLabel.setForeground(new Color(0,0,0));
                statusLabel.setFont(new Font("Lucida Grande", 0, 18));
                statusLabel.setText("Attempts: " + this.pogingen);
                statusLabel.setLocation(statusLabel.getX(), -20);
            }
        }
        else{
            timerStatusBar.stop();
            statusBarActive = false;
        }
    }
    
    
    private void MemoryKaart1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart1ActionPerformed
        this.MemoryCard1 = true;
        this.hoverEffect1 = false;
    }//GEN-LAST:event_MemoryKaart1ActionPerformed
    
    private void MemoryKaart2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart2ActionPerformed
        this.MemoryCard2 = true;
        this.hoverEffect2 = false;
    }//GEN-LAST:event_MemoryKaart2ActionPerformed
    
    private void MemoryKaart3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart3ActionPerformed
        this.MemoryCard3 = true;
        this.hoverEffect3 = false;
    }//GEN-LAST:event_MemoryKaart3ActionPerformed
    
    private void MemoryKaart4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart4ActionPerformed
        this.MemoryCard4 = true;
        this.hoverEffect4 = false;
    }//GEN-LAST:event_MemoryKaart4ActionPerformed
    
    private void MemoryKaart5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart5ActionPerformed
        this.MemoryCard5 = true;
        this.hoverEffect5 = false;
    }//GEN-LAST:event_MemoryKaart5ActionPerformed
    
    private void MemoryKaart6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart6ActionPerformed
        this.MemoryCard6 = true;
        this.hoverEffect6 = false;
    }//GEN-LAST:event_MemoryKaart6ActionPerformed
    
    private void MemoryKaart7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart7ActionPerformed
        this.MemoryCard7 = true;
        this.hoverEffect7 = false;
    }//GEN-LAST:event_MemoryKaart7ActionPerformed
    
    private void MemoryKaart8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart8ActionPerformed
        this.MemoryCard8 = true;
        this.hoverEffect8 = false;
    }//GEN-LAST:event_MemoryKaart8ActionPerformed
    
    private void MemoryKaart9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart9ActionPerformed
        this.MemoryCard9 = true;
        this.hoverEffect9 = false;
    }//GEN-LAST:event_MemoryKaart9ActionPerformed
    
    private void MemoryKaart10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart10ActionPerformed
        this.MemoryCard10 = true;
        this.hoverEffect10 = false;
    }//GEN-LAST:event_MemoryKaart10ActionPerformed
    
    private void MemoryKaart11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart11ActionPerformed
        this.MemoryCard11 = true;
        this.hoverEffect11 = false;
    }//GEN-LAST:event_MemoryKaart11ActionPerformed
    
    private void MemoryKaart12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MemoryKaart12ActionPerformed
        this.MemoryCard12 = true;
        this.hoverEffect12 = false;
    }//GEN-LAST:event_MemoryKaart12ActionPerformed
    
    private void MemoryKaart1MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart1MouseEntered
        if(this.hoverEffect1){
             MemoryKaart1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
        }
    }//GEN-LAST:event_MemoryKaart1MouseEntered
    
    private void MemoryKaart7MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart7MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_MemoryKaart7MouseClicked
    
    private void MemoryKaart7MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart7MouseEntered
       if(this.hoverEffect7){
            MemoryKaart7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
       }
    }//GEN-LAST:event_MemoryKaart7MouseEntered
    
    private void MemoryKaart2MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart2MouseEntered
      if(this.hoverEffect2) {
        MemoryKaart2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
      }
    }//GEN-LAST:event_MemoryKaart2MouseEntered
    
    private void MemoryKaart3MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart3MouseEntered
      if(this.hoverEffect3)  {
        MemoryKaart3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
    }
    }//GEN-LAST:event_MemoryKaart3MouseEntered
    
    private void MemoryKaart4MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart4MouseEntered
       if(this.hoverEffect4){
        MemoryKaart4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
       }
    }//GEN-LAST:event_MemoryKaart4MouseEntered
    
    private void MemoryKaart5MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart5MouseEntered
     if(this.hoverEffect5){  
        MemoryKaart5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
     }
    }//GEN-LAST:event_MemoryKaart5MouseEntered
    
    private void MemoryKaart6MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart6MouseEntered
       if(this.hoverEffect6){
        MemoryKaart6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
       }
    }//GEN-LAST:event_MemoryKaart6MouseEntered
    
    private void MemoryKaart8MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart8MouseEntered
        if(this.hoverEffect8){
        MemoryKaart8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
        }
    }//GEN-LAST:event_MemoryKaart8MouseEntered
    
    private void MemoryKaart9MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart9MouseEntered
       if(this.hoverEffect9){
        MemoryKaart9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
       }
    }//GEN-LAST:event_MemoryKaart9MouseEntered
    
    private void MemoryKaart10MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart10MouseEntered
       if(this.hoverEffect10){
        MemoryKaart10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
        }
    }//GEN-LAST:event_MemoryKaart10MouseEntered
    
    private void MemoryKaart11MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart11MouseEntered
       if(this.hoverEffect11){
        MemoryKaart11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
       }
    }//GEN-LAST:event_MemoryKaart11MouseEntered
    
    private void MemoryKaart12MouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart12MouseEntered
        if(this.hoverEffect12){
        MemoryKaart12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBacktSelected.png")));
        }
    }//GEN-LAST:event_MemoryKaart12MouseEntered
    
    private void MemoryKaart1MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart1MouseExited
        if(this.hoverEffect1){
        MemoryKaart1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart1MouseExited
    
    private void MemoryKaart2MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart2MouseExited
        if(this.hoverEffect2){
        MemoryKaart2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart2MouseExited
    
    private void MemoryKaart3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart3MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_MemoryKaart3MouseClicked
    
    private void MemoryKaart3MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart3MouseExited
        if(this.hoverEffect3){
        MemoryKaart3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart3MouseExited
    
    private void MemoryKaart4MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart4MouseExited
        if(this.hoverEffect4){
        MemoryKaart4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart4MouseExited
    
    private void MemoryKaart5MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart5MouseExited
        if(this.hoverEffect5){
        MemoryKaart5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart5MouseExited
    
    private void MemoryKaart6MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart6MouseExited
        if(this.hoverEffect6){
        MemoryKaart6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart6MouseExited
    
    private void MemoryKaart7MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart7MouseExited
        if(this.hoverEffect7){
        MemoryKaart7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart7MouseExited
    
    private void MemoryKaart8MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart8MouseExited
        if(this.hoverEffect8){
        MemoryKaart8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart8MouseExited
    
    private void MemoryKaart9MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart9MouseExited
        if(this.hoverEffect9){
        MemoryKaart9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart9MouseExited
    
    private void MemoryKaart10MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart10MouseExited
        if(this.hoverEffect10){
        MemoryKaart10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart10MouseExited
    
    private void MemoryKaart11MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart11MouseExited
        if(this.hoverEffect11){
        MemoryKaart11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart11MouseExited
    
    private void MemoryKaart12MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_MemoryKaart12MouseExited
        if(this.hoverEffect12){
        MemoryKaart12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/memoryKaarten/memoryKaartBackt.png")));
        }
    }//GEN-LAST:event_MemoryKaart12MouseExited

    private void jButton_backMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton_backMouseEntered
        jButton_back.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Back_Button_Glow.png")));;
    }//GEN-LAST:event_jButton_backMouseEntered

    private void jButton_backMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton_backMouseExited
        jButton_back.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Back_Button.png")));;
    }//GEN-LAST:event_jButton_backMouseExited

    private void jButton_backActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_backActionPerformed
        buttonBackPressed = true;
    }//GEN-LAST:event_jButton_backActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {



        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Memory_spel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Memory_spel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Memory_spel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Memory_spel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {
            
            public void run() {
                new Memory_spel().setVisible(true);
                
            }
        });
        
        
        
    }

    private void voledigScherm() {

        //Zet het scherm op voledig scherm;
        addWindowListener(new WindowAdapter() {

            @Override
            public void windowOpened(WindowEvent e) {
                setExtendedState(MAXIMIZED_BOTH);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton MemoryKaart1;
    public javax.swing.JButton MemoryKaart10;
    public javax.swing.JButton MemoryKaart11;
    public javax.swing.JButton MemoryKaart12;
    public javax.swing.JButton MemoryKaart2;
    public javax.swing.JButton MemoryKaart3;
    public javax.swing.JButton MemoryKaart4;
    public javax.swing.JButton MemoryKaart5;
    public javax.swing.JButton MemoryKaart6;
    public javax.swing.JButton MemoryKaart7;
    public javax.swing.JButton MemoryKaart8;
    public javax.swing.JButton MemoryKaart9;
    private javax.swing.JButton jButton_back;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel statusBar;
    private javax.swing.JLabel statusLabel;
    // End of variables declaration//GEN-END:variables
}
